The present invention relates to communications networks and, in particular, to the exchange of data between users of computational resources connected to a communications network and a distributed resource allocator handling system that manages the use of those computational resources, including resolving contending requests for use of the computational resources.
A typical communications network comprises a number of computers and other electronic devices interconnected by a data transmission network. Data transmission networks include public switched telephone networks (PSTNs), ATM networks, internal intranets, the Internet and private networks implemented using any of a large number of available software and hardware components. Commonly, a computer is connected to a physical data transmission network through one or more physical ports, each port having a unique network address. Additional types of electronic devices may also be directly connected to a physical data transmission network or may be accessed from the physical data transmission network through an intermediate computer to which the electronic devices are attached. These additional electronic devices include modems, printers, switchboards, and audio response units.
Each computer attached to the network can execute one or more software programs. An instance of a running program is called a process. A person using a general purpose computer normally launches the execution of application programs. Application programs include word processing programs, web browsers, spread sheets, and computer games. Such programs will be called xe2x80x9cusersxe2x80x9d in the following discussion. Application programs can, in turn, request and make use of operating system services provided by concurrently executing operating system programs. These services include the transfer of data from one general purpose computer to another over a physical data transmission network. The data may be transferred to another application program running on a remote computer or to a peripheral device such as a modem or a printer. An application program may also initiate execution of a program on a remote computer, transmit data to that program, and receive data back from that program over a physical data transmission network. The electronic devices, including computers, that a user may directly request services from, either directly or indirectly through operating system calls, are commonly referred to as computer resources.
FIG. 1 represents a schematic diagram of a simple communications network. The physical data transmission network 101 is represented as a central spoke and hub feature connecting the remaining elements in the diagram. These remaining elements include computers 102-106, users 107-110, and resources 112-118. One resource 112 is connected directly to the physical data transmission network. Resources 113-118 are indirectly connected to the network through computers. Tasks 111, 119, and 120 are processes running on a multi-tasking computer. Each task is launched by a user. The capacity of this multi-tasking computer 106 to run processes is considered a resource. Resources 112-118 represent printers, modems, switchboards, or other electonic devices.
A communications network, like the network displayed in FIG. 1, provides the potential for a user running on one computer to exchange data with, and request services from, remote resources connected to the network. For example, suppose computer 102 in FIG. 1 represents a personal computer running a software application program corresponding to user 107. Resource 113, which is attached directly to this personal computer, represents a black and white laser printer. Resource 114, which is directly connected to computer 104, represents a color printer. Suppose that user 107 has been directed to print out a color diagram. In order to print the color diagram, user 107 must send to computer 104, through the physical data transmission network, a file representing the diagram to be printed and a request that that file be printed out by the color printer 114.
Even in a simple communications network, like the one displayed in FIG. 1, attempts by several users to simultaneously access remote resources can lead to a number of problems. Continuing with the above example, suppose user 109 running on computer 106 has also been directed to print a color diagram, and user 109 sends a request to computer 104 to print the color diagram on color printer 114 at about the same time as user 107 sends its request. In such a case, users 107 and 109 are said to contend for resource 114. Some resources, such as color printer 114, contain a queuing mechanism that resolves such contentions by queuing the requests in the order that they arrive. This means, however, that if user 107 made its request slightly ahead of user 109, user 109 must wait until the request made by user 107 has been completed. Forcing user 109 to wait until user 107 relinquishes printer 114 may adversely affect user 109""s expected quality of service. For example, user 109 may be forced to wait for an extremely long period of time before having the request processed.
Suppose further that resource 112 is a high speed modem without a sophisticated queuing mechanism, and suppose users 108 and 110 have been simultaneously directed to transmit large data files using this modem to a remote computer accessible only over telephone lines. In this case the consequences of contention may be quite severe, resulting in garbled transmission or the failure of one or both of the computers to transmit their files. Such contention also raises the same quality of service issues discussed above.
Suppose further that resource 112 is a bi-directional high speed modem that may be accessed by users from both inside and outside a computer network. Thus, if user 110 attempts to access the high speed modem 112 from outside the network while user 108 tries to access the modem from inside the network, then at least one of these users will not gain access to this modem. Under some circumstances, it may be preferable for user 110, the outside requester, to gain access to the modem 112 over user 108, regardless of the order in which their respective requests arrive. Such contention problems are nearly impossible to solve at the application program level. Users must know which resources are accessible via the network and which resources are currently busy with other tasks. This further implies that the users have essentially global information about the entire communications network and the resources therein. Such global information is dynamic rather than static. Printers can be turned on and off, for instance, or additional resources can be added to the network. It is far beyond the capability of application programs to acquire and maintain dynamic global network information. Even if a particular application program could be written to acquire and maintain dynamic global information, every other software application program would also need to be written with this capability. Such redundancy is prohibitively expensive and inefficient. In the example of high speed modem 112, both user 108 and user 110 would also need to be aware of each other and to constantly monitor the timing of each other""s requests for modem 112.
The present invention provides a method and system for exchanging data between a user and a distributed resource allocator handling system that allocates computer resources connected to a communications network to users requesting those resources. The distributed resource allocator handling system comprises a number of resource allocator system agents, each running as a separate process on a computer connected to the network. Each resource allocator system agent maintains a database of global network resource information and constantly communicates with all other resource allocator system agents that comprise the distributed resource allocator handling system to ensure that each resource allocator system agent has the same global network information. A resource allocator system agent may be accessed directly by a user running on the same computer via an applications programming interface, or may be accessed by a user running on a remote computer via a communications protocol that provides the same functional interface as that provided by the applications programming interface. Resource allocator system agents communicate with each other using a different communications protocol. The elements of the resource allocator handling system provide an efficient mechanism for preventing contentions and conflicts based on the request priority and arrival time. Resolving contention based on request priority and arrival time resolves contending resource requests in a manner that minimizes the adverse impacts on the resource requesters"" quality of service.
Aspects of the present invention also provide a method of contention resolution and conflict prevention across a plurality of resources in a distributed resource allocator handling system operating in a plurality of domains within a computer network. The method entails receiving a request for a resource. The contention resolution mechanism first determines if the resource request originates from within or outside the distributed resource allocator handling system. If the resource request originates from outside the distributed resource allocator handling system, then the contention control mechanism places the resource request at the beginning of a queue for the requested resource. If the resource request arises from within the distributed resource allocator handling system, then the contention control mechanism determines the priority associated with the resource request. The contention control mechanism then compares the resource request priority against the priorities of previously queued requests for the resource. If the resource request priority does not match the priority of a previously queued resource request, then the contention control mechanism inserts the resource request into the resource queue according to its priority. If the resource request matches the priority of at least one previously queued resource request, then the contention control mechanism queues the resource request according to both its priority and its time of arrival. If the resource request""s priority and time of arrival both match a previously queued request priority and time of arrival then the contention control mechanism inserts the resource request in the resource""s queue at a position following the previously queued resource having the same priority and time of arrival, according to one embodiment of the invention.